package com.sunnada.exam.dao;

import com.sunnada.exam.po.ResultsPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ResultsMapper {
    @Insert("insert into results(name,result,tid) values(#{name},#{result},#{tid})")
    boolean insert(ResultsPo resultsPo);

    @Select("select * from results")
    List<ResultsPo> list();

    @Select("select * from results where id = #{id}")
    ResultsPo one(String id);

    @Delete("delete from results where id = #{id}")
    boolean delete(String id);
}
